<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>企业员工工资管理-工资详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="static/css/font.css">
    <link rel="stylesheet" href="static/css/xadmin.css">
    <script type="text/javascript" src="static/js/jquery-3.3.1.js"></script>
    <script type="text/javascript" src="static/lib/layui/layui.js"></script>
    <script type="text/javascript" src="static/js/xadmin.js"></script>
</head>

<body class="layui-anim layui-anim-up">

<div class="x-nav">
      <span class="layui-breadcrumb">
        <a>首页</a>
        <a>工资管理</a>
        <a>
          <cite>工资详情</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body" id="container">
    <div class="demoTable">
        年度查询：
        <div class="layui-inline">
            <input name="d" id="year" lay-verify="date" autocomplete="off" class="layui-input" type="text" readonly>
        </div>
        <button class="layui-btn" data-type="reload">查&nbsp;&nbsp;询</button>
    </div>

    <div style="text-align: center">
        <table class="layui-table" lay-data="{height: 'full', cellMinWidth:80, url:'employeeSalaryList.do',even: true, page:true,initSort: {field: 'sTime', type: 'desc'}, id:'idTest'}" lay-filter="demo">
            <thead>
            <tr>
                <th lay-data="{field:'sTime',sort: true ,width:83, fixed: true,align: 'center'}" rowspan="2">月份</th>
                <th lay-data="{field:'shouldPay', width:86, align: 'center'}" rowspan="2">应发工资</th>
                <th lay-data="{field:'basePay', width:86, align: 'center'}" rowspan="2">基本工资</th>
                <th lay-data="{field:'rissuePay', width:86, align: 'center'}" rowspan="2">其他工资</th>
                <th lay-data="{minWidth:100,align: 'center'}" colspan="4">补贴</th>
                <th lay-data="{minWidth:100,align: 'center'}" colspan="4">奖金</th>
                <th lay-data="{minWidth:86,align: 'center'}" colspan="6">五险一金</th>
                <th lay-data="{minWidth:86,align: 'center'}" colspan="5">工资扣额</th>

                <th lay-data="{field:'actualPay', width:100,sort: true , fixed: 'right',align: 'center'}" rowspan="2">实发工资</th>
                <th lay-data="{field:'sState', templet: '#checkboxTpl',unresize: true ,width:88, fixed: 'right',align: 'center'}" rowspan="2">发放</th>
            </tr>
            <tr>
                <th lay-data="{field:'foodPay', minWidth:60,align: 'center'}">餐饮</th>
                <th lay-data="{field:'postPay', minWidth:60,align: 'center'}">岗位</th>
                <th lay-data="{field:'trafficPay', minWidth:60,align: 'center'}">交通</th>
                <th lay-data="{field:'businessTravelPay', minWidth:60,align: 'center'}">出差</th>

                <th lay-data="{field:'workingYearPay', minWidth:60,align: 'center'}">工龄</th>
                <th lay-data="{field:'rankPay', minWidth:60,align: 'center'}">职称</th>
                <th lay-data="{field:'overtimePay', minWidth:70,align: 'center'}">加班</th>
                <th lay-data="{field:'fullAttendancePay', minWidth:60,align: 'center'}">全勤</th>

                <th lay-data="{field:'persionPay', minWidth:70,align: 'center'}">养老</th>
                <th lay-data="{field:'medicalPay',  minWidth:70,align: 'center'}">医疗</th>
                <th lay-data="{field:'unemploymentPay', minWidth:60,align: 'center'}">失业</th>
                <th lay-data="{field:'injuryPay', minWidth:60,align: 'center'}">工伤</th>
                <th lay-data="{field:'birthPay', minWidth:60,align: 'center'}">生育</th>
                <th lay-data="{field:'housingPay', minWidth:100,align: 'center'}">住房公积金</th>

                <th lay-data="{field:'latePay',  minWidth:60,align: 'center'}">迟到</th>
                <th lay-data="{field:'earlyPay', minWidth:60,align: 'center'}">早退</th>
                <th lay-data="{field:'sickPay', minWidth:60,align: 'center'}">病假</th>
                <th lay-data="{field:'thingPay', minWidth:60,align: 'center'}">事假</th>
                <th lay-data="{field:'individualIncomeTax', minWidth:100,align: 'center'}">个人所得税</th>
            </tr>
            </thead>
        </table>
    </div>


    <table class="layui-hide" id="idTest"></table>
    <script type="text/html" id="checkboxTpl">
        <!-- 这里的 checked 的状态只是演示 -->
            <input type="checkbox" disabled="" name="lock" value="{{d.sState}}" title="是" lay-filter="lockDemo" {{ d.sState== 1 ?'checked'
            : '' }}>
    </script>
</div>
</body>
<script>
    var year = new Date().getFullYear();
    layui.use(['laydate','table'], function(){
            var laydate = layui.laydate
            ,table = layui.table;
        

        //年月范围
        laydate.render({
            elem: '#year'
            ,type: 'year'
            ,value:year
            ,isInitValue: true
        });

        var $ = layui.$, active = {
            reload: function () {
                var demoReload = $('#demoReload');
                //执行重载
                table.reload('idTest', {
                    page: {
                        curr: 1 //重新从第 1 页开始
                    },
                    where: {
                        year: $("#year").val()
                    }
                    , page: true
                });
            }
        };
        $('.demoTable .layui-btn').on('click', function () {
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });
    });
    
</script>
</html>